﻿using System;

namespace FDEE.Model
{

    
    public class MANRebarRecord : RebarBase
    {
        public int  LapLengthTop, LapLengthBot, Phi, hook;
        public double  DowelLen;
        /// <summary>
        /// MA 型钢筋长度重量计算 - 直筋，可能存在两端搭接和锚固承台（其他构件）
        /// </summary>
        /// <param name="mBarMark">钢筋主编号，例如1</param>
        /// <param name="sBarMark">钢筋次编号，例如1.1，默认为0</param>
        /// <param name="cBarMark">钢筋字符编号，例如1a，默认为空</param>
        /// <param name="diameter">钢筋直径，按eDB选取</param>
        /// <param name="len"></param>
        /// <param name="lapLengthTop"></param>
        /// <param name="lapLengthBot"></param>
        /// <param name="phi"></param>
        /// <param name="dowellen"></param>
        /// <param name="quantity"></param>
        /// <param name="shapeConfig"></param>
        public MANRebarRecord(int mBarMark, int sBarMark, string cBarMark, eDB diameter,
            int len,int N, int quantity, eShapeType shapeConfig):base(mBarMark,sBarMark,cBarMark,diameter,quantity,shapeConfig)
        {          
            A = len;
            n = N;
            this.Formula = "L=A+2n-r-2d";
        }
       


        public override void SetLength()
        {
            Length = Math.Round((A +2*n-r-2*d)* 0.001, 3, MidpointRounding.AwayFromZero);
        }
    }
   
}
